<?php if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
extract(itx_get_option('front'));?>

<div id="itx-front">
<h3>Front page design</h3>
<hr/>

<h4>Layout</h4>
<p>These settings will affect all index page, categories pages, archives page, etc wich not a single post or single page.</p>
<p>Please note that Featured item only shows in front page (page one). Other pages (page two or more) not showing featured item.</p>

<table class="form-table">
<tr><th>Display type:</th><td>
	<?php 
	itx_form_radios(array('traditional'=>'Traditional','excerpt'=>'Excerpts','fe'=>'Featured and Excerpts', 'fl'=>'Featured and Line'),'itx_front[type]',$type);
	?>
</td></tr>

<tr><th>Arrange Excerpt by:<br /><small>If display type B or C selected</small></th><td>
	<select name="itx_front[column]" id="ifront">
		<?php
		itx_form_options(array(1=>'One Column',2=>'Two Columns',3=>'Three Columns',4=>'Four Columns',5=>'Five Columns',6=>'Six Columns',7=>'Seven Columns',8=>'Eight Columns'), $column);
		?>
	</select>
</td></tr>

<tr><th>Limit Featured text</th><td>
<input type="text" name="itx_front[featuredlim]" value="<?php echo $featuredlim; ?>" class="small-text" /> words</td></tr>

<tr><th>Limit Excerpts text</th><td>
<input type="text" name="itx_front[excerptlim]" value="<?php echo $excerptlim; ?>" class="small-text" /> words</td></tr>
</table>
<hr/>


<h4>Posts Thumbnails</h4>
<p>Thumbnails/images  on index page, categories pages, archive pages, etc. Not including thumbnails on single post or single page. </p>
<p>In WordPress 2.9 and later, Post Thumbnail and Featured Images are croped to fit these values. Both are set via post-thumbnail feature using same image.</p>
<p>In WordPress prior to 2.9 you can set post-thumbnai using Custom field. The name is <strong>thumb</strong>. You can enter the attachment-ID if the image or the URL of the image.
    If attachment-ID is set in <strong>thumb</strong> custom field, the system will use the attachment image and resize them to fit these sizes set below using CSS.
    If <strong>thumb</strong> custom field value is an URL, the system will use timthumb to crop the image to fit these sizes set below.
</p>
<p>More about Attachment in WordPress: <a href="http://codex.wordpress.org/Using_Image_and_File_Attachments">Attachments</a>
More about Custom Field in WordPress: <a href="http://codex.wordpress.org/Custom_Fields">Custom Fields</a></p>

<table  class="form-table"><tr><th>Featured size</th><td>
	Width <input type="text" name="itx_front[featuredx]" value="<?php echo $featuredx; ?>" class="small-text" maxlength="3" />
	Height <input type="text" name="itx_front[featuredy]" value="<?php echo $featuredy; ?>" class="small-text" maxlength="3" /><br />
</td></tr>

<tr><th>Thumbnail size</th><td>
	Width <input type="text" name="itx_front[thumbx]" value="<?php echo $thumbx; ?>" class="small-text" maxlength="3" />
	Height <input type="text" name="itx_front[thumby]" value="<?php echo $thumby; ?>" class="small-text" maxlength="3" /> <br />
	Post thumbnails are croped to fit these values.

<tr><th>If no Post Thumbnail Set in a post </th><td>
	<?php
	itx_form_radios(array(0=>"Don't find any other thumbnail/image",'1'=>'Try to find a thumbnail/image in the post'), 'itx_front[catch]', $catch);
	?>
</td></tr>

<tr><th>If no Thumbnail/Image Found in a post </th><td>
	<?php
    itx_form_radios(array(0=>"Don't display any box",1=>'Display a box with default pattern',2=>'Display custom image:<div class="radiopad">Featured size: <input type="text" name="itx_front[fnotimg]" value="'.$fnotimg.'" class="regular-text"><br />Thumbnail size: <input type="text" name="itx_front[notimg]" value="'.$notimg.'" class="regular-text"><br />Enter the url here. Don\'t forget the http://</div>'), 'itx_front[not]', $not);
	?>
</td></tr></table>
<button type="submit" name="itx_reset" class="button-secondary"  value="front">Reset to default Front Page Options</button>
</div>